
package com.unitreport.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Component;

import com.unitreport.domain.SvnRepositoriesDir;
import com.unitreport.svn.SvnUtil;

/**
 * @author Yu Yang
 *
 * 2013年9月26日
 */
@Component("svnService")
public class SvnServiceImpl implements SvnServiceI {

	public List<SvnRepositoriesDir> getRootUrl() {
		List<SvnRepositoriesDir> list = new ArrayList<SvnRepositoriesDir>();
		SvnRepositoriesDir srd2 = new SvnRepositoriesDir();
		srd2.setId("svn://www.oksvn.com/tutorwebsite");
		srd2.setText("svn://www.oksvn.com/tutorwebsite");
		srd2.setState("closed");
		list.add(srd2);
		
		SvnRepositoriesDir srd = new SvnRepositoriesDir();
		srd.setId("https://zdsoftyang.googlecode.com/svn/trunk");
		srd.setText("https://zdsoftyang.googlecode.com/svn/trunk");
		srd.setState("closed");
		list.add(srd);
		return list;
	}

	public List<SvnRepositoriesDir> getChildren(String pathUrl) {
		List<SvnRepositoriesDir> list = new ArrayList<SvnRepositoriesDir>();
		SvnRepositoriesDir srd = new SvnRepositoriesDir();
		srd.setId("svn://clklxcvsp01.cathaypacific.com/CommunicationService");
		srd.setText("CommunicationService");
		srd.setState("closed");
		list.add(srd);
		return SvnUtil.getSvnRespDirList(pathUrl);
	}

}
